<!doctype- html>
 <html>
    <head>
    	<meta charset="utf-8">
    	<title>登陆成功 正在跳转</title>
    	<style >
    		body {background-color:#daf1fd;
    		 }
    		div{font-size: 50px;
    		
    		  color: #0f88eb;
    			/*position:absolute;  
             	top:40%;  
               	left:50%;  
 				-webkit-transform:translate(-50%,-50%);  
  				-moz-transform:？(-50%,-50%);  
  				transform:？(-50%,-50%); */
  			}
    	</style>


      <script>
        function load() {
            var username=sessionStorage.key(sessionStorage.length);
            if(sessionStorage.length==0) {
                alert("请先登录");
                window.location.href = 'http://indianxiaohao.gitee.io/ugi/fengliu.html';
            }
            else {
                var ming = document.getElementById("dengluming");
                ming.innerHTML=sessionStorage.getItem("username");
            }



            var list=document.getElementById("list");
            var result="<table border='1'align='center'>";
            result+="<tr><td>用户名</td><td>邮箱</td><td>密码</td><td>注册时间</td></tr>";
            for(var i=0;i<localStorage.length;i++) {
                var sitename = localStorage.key(i);
                var str = localStorage.getItem(sitename);

                if (typeof str === 'string') {
                    var site = JSON.parse(str)
                }
                result += "<tr><td>" + sitename + "</td><td>" + site.email + "</td><td>" + site.password + "</td><td>" + site.timenow +"</td></tr>";
            }
                result+="</table>";
                list.innerHTML=result;


        }
        function clear() {
            window.location.href='http://indianxiaohao.gitee.io/ugi/fengliu.html';

        }

    </script>
    </head>
    <body>
    	<div>
    		<p>登陆成功 </p>
               
<div id="dengluming" style="text-align:center;"></div>

    <div id="list" style="text-align:center;"></div>


<script>load()</script>
    </body>
 </html>